.so ../bk-macros
.TH "bk cat" "\*[BKVER]" %E% "\*(BC" "\*(UM"
.SH NAME
bk cat \- concatenate and display file contents
.SH SYNOPSIS
.B bk cat
.FILESreq
.SH DESCRIPTION
.B bk cat
is used to send one or more files to the standard output.
It is used when a file's contents are wanted but the caller
does not know if the file is or is not under revision control
or is or is not checked out.
.LP
.B bk cat
differs from the standard \*(UN cat command in two ways:
a) it does not support any of the \*(UN cat options, and
b) if a file is specified which does not exist, but a
corresponding sfile does exist, the most recent version of
sfile is sent to standard output.
.LP
The following shell script emulates the bk cat command:
.DS
for i in "$@"
do       if [ -f $i ]
         then    cat $i
         else    # ignore error messages
                 bk co -kp $i 2>/dev/null
         fi
done
.DE
.SH CATEGORY
.B File
